package com.itheima.mongo.repository;

import com.itheima.mongo.pojo.ApComment;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * @Description:
 * @Version: V1.0
 */
public interface ApCommentRepository extends MongoRepository<ApComment, String> {


    /**
     * 根据条件查询带分页
     * @param address
     * @param pageable
     * @return
     */
    Page<ApComment> findByAddress(String address, Pageable pageable);

    Page<ApComment> findByAddressAndLikesGreaterThan(String address, Integer likes, Pageable pageable);
}
